﻿using System;
using System.Collections.Generic;
using System.Text;

namespace KD.Sms.SerialServer
{
    public class CommonEventArgs : EventArgs
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="error"></param>
        internal CommonEventArgs(string error)
        {
            M_Value = 0;
            M_Buffer = null;
            M_Error = error;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="_byBuffer"></param>
        internal CommonEventArgs(byte[] _byBuffer)
        {
            M_Buffer = _byBuffer;
            M_Value = 0;
            M_Error = null;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="_iValue"></param>
        internal CommonEventArgs(decimal _iValue)
        {
            M_Error = null;
            M_Buffer = null;
            M_Value = _iValue;
        }

        /// <summary>
        /// 重量
        /// </summary>
        public byte[] M_Buffer { get; private set; }

        /// <summary>
        /// 激光测距
        /// </summary>
        public decimal M_Value { get; set; }

        /// <summary>
        /// 故障信息
        /// </summary>
        public string M_Error { set; get; }
    }
}
